package com.wlyuan.index.api.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author yuanjie
 */
@Data
public class QuotationIndexDTO implements Versioned, Serializable {
    public static final Integer WAYBILL = 1;
    public static final Integer COMBINE = 2;

    @Data
    public static class Relation implements Serializable {
        private Integer status;
        private Long tenantId;
    }

    @NotNull
    private Long subjectSourceId;

    @NotNull
    private Integer subjectType;

    @NotNull
    @ApiModelProperty("报价单ID")
    private Long quotationId;

    @ApiModelProperty("报价单号")
    private String quotationNo;

    @ApiModelProperty("状态")
    private Integer status;

    @ApiModelProperty("租户ID")
    private Long tenantId;

    @NotNull
    private List<Relation> relations;

    @NotNull
    @ApiModelProperty("版本")
    private Long version;

    public Long getSourceId() {
        return this.subjectSourceId;
    }

    public Integer getSourceType() {
        return this.subjectType;
    }
}
